<template>
  <div>
    <input v-bind="$attrs"
           :type="type"
           :value="value"
           @input="handleInput">
  </div>
</template>

<script>
export default {
  name: 'LgInput',
  inheritAttrs: false,//禁用继承父组件传过来的属性
  props: {
    value: {
      type: String
    },
    type: {
      type: String,
      default: 'text'
    }
  },
  data () {
    return {

    };
  },
  methods: {
    handleInput (evt) {
      this.$emit('input', evt.target.value)
    }
  }
};
</script>

<style scoped >
</style>
